package com.longge;

import com.longge.*;
import java.util.*;
public class Main{
    public static void main(String[] args){


        Scanner sc = new Scanner(System.in);

        while(sc.hasNext()){
            HashMap<Character,Integer> hashmap = new LinkedHashMap<>();
            int min = 0;
            String str  = sc.nextLine();
            for(int i=0;i<str.length();i++){
                Character c = str.charAt(i);
                if(!hashmap.containsKey(c) ){
                    hashmap.put(c,1);
                    min=1;
                }else{
                    Integer count =  hashmap.get(c);
                    hashmap.put(c,++count);
                    if(count<min){
                        min=count;
                    }
                }

            }
            Set<Character> characters = hashmap.keySet();
            for (Character key :characters ) {
                if(hashmap.get(key)== min){
                    continue;
                }
                for(int i=0;i<hashmap.get(key);i++){
                    System.out.print(key);

                }
            }



        }
    }
}